package com.yuyu.storage.domin.repository;

import com.yuyu.storage.domin.Do.GoodsStockDO;

import java.util.List;

/**
 * @author
 * @version 1.0
 * @description: 库存接口
 * @date 2022/8/10 14:38
 */
public interface StockRepository {

    /**
     * 通过商品id来获取库存
     * @param goodsId
     * @return
     */
    Long getStockByGoodsId(Long goodsId);

    List<GoodsStockDO> getAll();

    void rollBackStock(Long goodsIds,Long frozenNum);
}
